package 设计模式.行为模式._21策略模式;

public class StrategyTest {
	 
	public static void main(String[] args) {
		String exp = "2+8";
		ICalculator cal = new Plus();
		int result = cal.calculate(exp);
		System.out.println(result);
		ICalculator cal2 = new Minus();
		exp = "8-2";
		int result2 = cal2.calculate(exp);
		System.out.println(result2);
	}
}

